|
|
|
|
|
|
|
Note If you try to use the Checked property for a top-level menu item, you'll get an error message. You can't toggle top-level menu items on and off. |
|
|
|
|
|
|
|
|
|
The WindowList property specifies that a list of open MDI child forms will be displayed. When this property is set to True, the menu automatically adds items as child forms are opened and removes any child forms that are closed. |
|
|
|
|
|
|
|
|
Creating and Using Pop-Up Menus |
|
|
|
|
|
|
|
|
Menus are generally thought of as occupying the bar at the top of an application form and usually being visible. Visual Basic allows you to create another type of menu that appears only when needed and directly next to the area you're working with. These pop-up menus are often used to handle functions related to a specific area of the form. For an example of this type of menu, right-click anywhere in the code editor window of Visual Basic for a code-related menu (see Figure 4.25). Pop-up menus usually appear at the mouse pointer's current location. After you select an option from the menu, it disappears from the screen. |
|
|
|
|
|
|
|
|
Figure 4.25.
Pop-up menus give users many
available options directly related to the work
they're now performing. |
|
|
|
|
|
|
|
|
To create a pop-up menu, you use the Menu Editor in the same way you used it to create other menu and submenu items, except for one extra step: set the pop-up menu's Visible property to False (deselected). This prevents it from being displayed on the top-level menu bar. |
|
|
|
|
|
|
|
|
Note If you want to have a menu item appear on the standard menu bar and use it as a pop-up menu, you wouldn't set the Visible property to False. |
|
|
|
|
|
|